<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <span>Web Worker: <span id="workerId"></span></span>
    <script>
        const span = document.getElementById("workerId");
        const worker = new Worker("./worker.js");
        worker.postMessage("hello worker")
        worker.onmessage = (e) => {
            span.textContent = e.data;
        }
    </script>
</body>
</html>